package com.woniuxy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woniuxy.dao.TemporaryDao;
import com.woniuxy.entity.Temporary;
import com.woniuxy.service.TemporaryService;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class TemporaryServiceImpl implements TemporaryService {
	@Autowired
	private TemporaryDao temporaryDao;

	@Override
	public int addTemporary(Temporary temporary) {

		return temporaryDao.addTemporary(temporary);
	}

	@Override
	public Temporary findTemporaryByPid(int pid) {
		return temporaryDao.findTemporaryByPid(pid);
	}

	@Override
	public int updateTemporaryTstatus(int tid, String tstatus) {
		return temporaryDao.updateTemporaryTstatus(tid, tstatus);
	}

	@Override
	public Temporary findTemporaryByOid(int oid) {
		return temporaryDao.findTemporaryByOid(oid);
		
	}

	@Override
	public int updateTemporayOid(Temporary temporary) {
		
		return temporaryDao.updateTemporayOid(temporary);
	}
	
	

}
